Migrating to java based config