Refactor style and syntax