Cleanup: Using Action instead of switch