Removing lots of unused logic