Refactoring and cleanup of Menu and Parameter system.