major changes to java backend, introduce more sandwich files