Delete commented code and remove objects from array when they are no visible
Improve key input