Here's the merge of your code and the bug fixes.

Some prefab changes, but I think it should be easy enough to merge.