Refactored tests, fix prefix_operation