Rearrange the code of model part.
Remove some unuser JS files.