Code metric fixes