remove useless deps and make methods more testable