Can now retype functions
Optimizations