refactoring: split into files
pieces panel toggle
templates split
different menu width on touch and mouse devices
rm empty category
counter place fix