Cleaning up a bunch of unused functions