moved mapgen to it's own class