Big refactor
Fix validation and stdin fileName
Merge pull request #3 from mirego/feature/refactoring

Big refactor