Tag functions by category, and fix format