Enable asset pipeline. for issue #167
cleanup, refactor and some fixes.