Moved classes to extra file, bugfixing.