removed problem with pressing enter to choose an element

improved performance and removed unnecesary bindings
other improvements and code refactoring