Switch from crappy test script to actual unit tests