Clean up codes to pass golint checks