Added test for retrieving named commands
Refactoring + tests missing reference error