Command library v1.1. Incorporated Graham Wilson's advice and added some other improvements.