Refactored backend module