Added civilization system

Preliminary civilization system added. Also fixed a bug in class system