Fixed height bug.

That was a pretty hard bug to find. I swapped x and y in an anonymous
class and that was the problem that took me hours to solve.
I tweaked the generation a bit, but it is still a really early
implementation that is likely subject to change in the future.