Organize code and improve functionality.

Fixes bugs:
* Can now place safe sources in flowing blocks.
* Obsidian/stone/cobble generation fixed.
* Can no longer break blocks by emptying a bucket into that space.