First approach to back-end refactor