Closes #7 and added a test script.