Removed unsed code and make selected tile a computed value.