Deleted a lot of dead code