This could be in mapgen. Not sure where it belongs really. Thoughts?