cleaned up GenerateCommand and fixed some append stubs