Remove types and put some functions in where