Manual merge of Map Generation

Merged but with errors in the entities package. Requiring merge of
entities branch.