Fixes/improve tests

Hello @franzose,

The following PR contains a couple of goodies:

* Position clamping (as discussed in #85)
* real_depth not being set properly on create
* More tests/asserts in EntityTestCase