first implementation of bags. still needs major cleanup, docs, new tests, and some missing features like field value validation