limit entity rendering by depth & code housekeeping

Now Entites that are covered by huge amount of blocks are hidden. You
have to lower the view depth to see Entites in lower layers.
Some code cleanup to fully implement the singleton pattern and
completely reworked the pack storage.