Added support for non-collectible objects. Also tidied some code.
Found those pesky compile bugs