Split index into appropriate EJS templates