improved some of the code styling
fixed docs to reflect current usage