Pull for some new code

The code you guys have probably doesn't work, I fixed some problems so that things actually happen as expected now. Also there was a test file causing travis to fail because I hadn't added any tests to it yet.