Tests added; minor changes