Refactor typography module