Generate obstacles functions & button added.

Fixes #7