Cleaned up some more code