Minor changes and tests