Refactored and simplified PositionFunction into StandardFunction