refactor views; finalize conversion to jade