Refactor 11 14

This refactor brings regex queries, collection by name and tests that actually test things.
I think you need to create an "aps" key with an object as its value before assigning to it.