Bug fixes; UI improvements; sample units tests