Merged repository changes, refactored