FancyPants: reorganized code. No functional change intended