Fix various issues
Fixes #536 (closed), #534 (closed), #530 (closed), #529 (closed), #528 (closed), #527 (closed), #525 (closed)
Please note that the theme switcher has been reworked. Themes have to be declared in their own files and the way of importing them into the main file has changed a little bit. See the wiki for details.