Add connect method, clean up tests