I remember having an absolute none understandable problem some months ago (took me hours to find it) and discovered that one of my personal function had a name too close a function used by LilyPond.
So, I would strongly advise you not to use names such as "up" and "down". Better use "ArrUp" and "ArrDown".