back-end updated for loading scripts and styles