Fix some minor issues and improve docblock