moving some scripts into typography.js