some fixes and new libraries
redesigning with requirejs and AMD modules