Cleaned code to make it readable.