Code cleanup

Code style issues resolved. Java docs added.
copyright updated.