cleaned up code and added usage strings
fixed minor output bug