simplified sort function
added assert
inlined some functions
fast path for named property access
unregister all user tasks on shutdown