history generation deleted (optional TODO); better constraints
NPEs during relations creation fixed