Added basic requirejs functionality
Fixed sync