Commenting changes, cleaning out code and fixing NPE