Function Resolve refactor

Code refactor around the function repository, removed useless class.