Fix/faster tests

I rewrote part of the testing to make it more reliable and faster on Travis. Provided this passes, I'll be merging it in today.