The great code refactoring

Shiny new panel included.
(Literally - I'll do a dark theme later)