Refactored a lot of stuff, including rendering and data lib.