Java rewrite engine

Some jobs last night