adding codenarc rules and fixing violations