Fixed bugs in selection logic. Now it works. Also, added a first attempt at showing the selected entities. It's ugly, but it works.