Now uses API. Some minor style/typo fixes.