Fixed - Thanks Stack Exchange

many things corrected... now returns expected results.
Minor tweaks

Minor tweaks were made. (do I commit too much?)