context.js: iron out various preview kinks