fixed minor logical issues
added a skeleton for a manual.