CBK pretty much summed up the answer to your question quite nicely. However as a suggestion, Skyld wrote a pretty good HP class you might want to take a look at:
http://forums.graalonline.com/forums...p/t-68271.html (kind of dated but still applicable)
It isn't required, but it'd at least make a good reference to prevent that HP class from getting any more messier than it already is.
One major thing to note is the usage of sleep() in your class. (?) wat