Added capsule manager for Queue.
Merge branch '4.1' of https://github.com/jyggen/framework into jyggen-4.1
Cleaning up some code.