JavaDocs and some small changes including informing the user if they enter an invalid command