DUDE

There's lots of refactoring, and even more important: comments. lots.
of. comments. Also, I made sure that all required functions from the
theme are present in the functions.php — enjoy!