refactoring
integrate freemarker template, and a markdown parser