Removed some unnecessary lines and obsolete todo comments