Fix some errors and update docs