Further changes and minor fixes