I have tried to reorganise the functions and classes. Still getting dependency related errors.