Added SBT build and refactored the code base.
removed iml file for it is better generated by intellij.
Made generated source serializable by adding implementes Serializable.