Tentative implementation of dialogs. Not going through this right now.
Initial implementation of MathLib