Bug fixes and a sample client