Started working on the add entity pattern functionality, get entity patterns, etc. Added some unittests which do not currently pass.