added normalization and some updated javadocs