Added lots of tests for builtin functions, more to come. Fixed bug in TypeProperty, obsolete labels are now
removed when the type of a node changes.