Refactoring data load for layers for performance improvement