Code for the controller module.

Signed-off-by: 8163jb <tocous@hotmail.co.uk>