Cleans up StatementController

Fixes #413 
Fixes #417