Clean up codes and comments