Add documentation to most classes, and fix the usedCommand logic