Fix short/expand functions / fix tests