Some more features and cleanup.