Added AddMixin funciton, more unit tests to entity

The add mixing function as added to use name and function for a
single mixin. Also added a bunch more unit tests to entity.

Other changes:
- Fixed syntax problem in Gruntfile