Migrate to java based config