decoding improvements, javadocs added
clean