Refactor FileWriter
Fix whitespaces
Document main module
Merge branch 'improve-doc' into development