Changed initial number value of the measure to "-1" to indicate the command has not run yet.
Tweaks and cosmetics.
Fixed typo in error message.