Fix dependency
Solve some format problems
Add specs and refactoring
Add specs and refactoring