Removed logging lines and useless variables.