Implemented basic generate functionality.