Cleanup the code so it conforms to the Caplin code style