Minor changes and some additional tests