Merged stray function definitions with operations.py