added controller module, various small changes