Cleaned and removed some of the logging
Cleaned up and fixed some of the code