code refactorying using requirejs and backbone