Reformatted the code to comply with coding conventions