Creates models + minor fixes (see commit history)