ignoring .DS_Store
a bit of modularization refactoring