Cleaned up a lot of unneeded code