Improve generation stuff