Some updates/fixes.

closes #4, closes #5, closes #7, closes #8, closes #10, closes #11,
closes #12, closes #13,  closes #14