Cleaned up into a better format