Removing bug in code and removing files that are not used