coding style changes and debug statements removed