Simplify long/complex functions