Clean up and new functionality