Added tests and clarified comments.
Stylized and removed newPath.
Merge pull request #323 from connermcd/dev

Here are the other changes without the async stuff