Added timeouts to most tests. Sligthly simplified syntax for runWithQueue functions.