Removing logs and cleaning up code