Refactor infrastructure