Just finished view logic, untested.