Rework view logic