Migrate to maven, began rewrite