Added possibility to remove unused/duplicate nodes. Some bug fixes.