Restructure the project and support function-types