Moved classes to separate file.