Adding tests
Add file for testing QwaitFuncs
Rebased on latest master