Better tests and client mode