Better docs and fix warnings