Fix tests

Solve races, TTY issues, [hellohello] problem. Improve test behavior.