Fix knob
Refactor a lot of code to utilities