Misc. cleanup
Java 6 did not support binary literals. Switched to hex.
More refactoring