Generators enhancements

Multiple code clean-up and enhancements for the command generators