Remove some messy code