Refactored govet warnings