added basic entity tests, fixed some bugs, Fixes #3