Better API and require.js stuff in server