Clean up tons of code