Refactored architecture