converting to require.js application

having quite got hang of require syntax yet im not defining the
functions corect