Clean up doc strings, formatting, and unused code