More work on terrain generation, fixed recursive return issue.