fixed warnings, removed empty lines
refactoring; extracted method, localized variables
changed identation to spaces
simplified file choosing filter logic
Merged miroque's functionality changes and metanota's code decomposing
Merge pull request #8 from metanota/master

Merged our changes in one