Make more functions PURE/CONST