Added phantom as background process in travis
Rewrote tests so it is per function now