added mocks and cleaned up variables