Mavenized. And fixed build issues.