main file refactor, add jade comple