Cleaned up more code