Refactor to coding guidelines