Fixing code and deleting useless code.