Added some controller code

Very incomplete