delete DS_Store
Refactoring and API improvements