Cleaned and formatted the code.