Drafting map generator code. Needs testing.