Fixed links add/remove bug.
Cleanup