Added the gui system, added documentation and formatted everything.