Removed unused code and incorrect comments