Closer integration of functions
Avoid using array slice