cleaning up code to get consistent coding style