Formatted the code for easy reading