Massive cleanup

Now looking into:
1. further function cleanup
2. separating the data-getting / rendering, cuz this sux.