Restructuring tests, adding mocking library

Don't seem to have write access so I'll keep bugging you with pull requests