Clean up code. Add mock dependency.