Reformated and optimized code.