Fixed the stupid mistaks Ayush made, and cleaned up the useless code