Controller tests

Ready to merge.