Address memory leaks; address origin errors
Merge pull request #9 from rochestb/bmsterling/memory-leak-cleanup

Address memory leaks; address origin errors