Use require.js for module loading
Extract webservice calling into it's own module with clear interface