Updated for Keype's layout manager, and require.js support.