Various fixes

Hi,

This is a PR containing a couple of fixes, most notably:

* Add debugging facilities
* Fix to createFromArray creating multiple entities entry
* Fix to node reordering on node creation
* Fix test cases not working
* Additional test cases for the Entity class
* Travis CI configuration update