Cleaned up code some more