Formatting improvements and fixed codenarc violations