Cleaning up code style before modularizing.