Add commandable, and init commands
Refactor code with appropriate patterns.
Fix sql referencing