Restructured the code a bit and added some pom.xml.