migrated build to maven and some minor changes to allow compilation