Updated method names to java naming convention.

Also improved some formatting and variable names.