Java rewrite engine3

fixing maps, etc