refactoring to make production assets work with nginx