refactoring generator for more effective maintenance

This changeset depend on `tilt` gem for using template engine,
and so, the output will be aligned.