Changes to override express view as a middleware

Also,
Code clean up. 
Fixing projects that broke in prod mode