Source structure refactoring, added templates and csv-formatter.