Moved class to external file

It looks cleaner and it prevents class undefined errors in PHP 5.5