Cleaned up and improved readability