Refactor run controllers

Use inhertance for more simplicity and extensibility
Add machine_type queries