Big refactor. TODO: fix labels.
Fix viewport interaction.