Encapsulate css and cleanup Issue #278