Revert "Rewrote the java layer to make it easier to extend and add new commands."

This reverts commit 0052010391a9248b94818f32b311c0f2ef4bb1ad.