Code cleanup

Cleans up code in the entity and utility libraries.

This commit also adds a small block to the bootstrapper to ensure that
gem dependencies are fulfilled.  If any gems are not found, they will be
installed.