redesign of base-script.js + directive,component,filter,state,controller