Fixed require.js timeout, polished dynamic template structuring