Fixes

Various small fixes/improvements.