code cleanup following mdo/code-guide on github