Documentation of variable rCode.
Cleaned up the behaviour and respective code of the add-node and add-edge buttons.