Add dependencies, some API refinement