Move more fully over to the framework, and remove commands
Clean up and apply static code analysis