Add data processing code and update Java to use simpler input