[commandlist] Used refs properly

- Cut out "mutables" and used refs for commandlist
- Broke down to more atomic functions
- Commandlist is now added to