Updated the header.
Removed closing PHP tag.
Wrapped to a class.