Clean up warnings and documentation