Improved helm-generator code to make it more testable and improved code coverage