Various additions and minor fixes.