Initialize device argument to NULL on malloc (closes #184)
Convenient assert macro for unit testing

It's never too late to remove 261 lines of code ;)