Cleaned up character generation

Separated into several functions