Added TestRunner test and refactored controller

also fixed some n00b bugs