Separate core functionality