Initial commit, with changes done to make the class PHP5+ friendly.
OOP corrected.