A bit of documentation and a few fixes