Initial refactor of the parseCommand method.
Fix indentation and make the arguments passable in parseCommand, and clean up setMotd.
Clean up the registerDevice method.
Remove mutation in listUsers by swapping a for loop for a stream.