Cleaned up code, removed unneccesary console logs