Refactored backend file structure