Refactored setJS and setCSS on View model