Moved classes in to external files and added autoloader