Fix this to work if no layout or partials are defined. Also, require path