Cleaned up code for a more professional user experience