Restructure and add mocks