cleaned up all code and added titles