Fix java 1.6 compatibility and added a debug mod in options