Cleaned up code. Removed console logs