Reformatted the code and improved the verbosity.