New UI functionalities and code improved

added insertion in head/tail, deletion of an element.