Applied binding and arrayController to reduce code and make it readable