Cleanup buddy add entry.
Restucture modules and add test suite.