parent and remove-function added plus minor fixes.