Removed some unnecessary code and logging