reformats app and controller
adds controller unit tests