format github output a little
extract definition of controller to own js module
use controller-as syntax