added gui elements and event system
not tested, wrote subdivision algo
fix in subd algo, setting default values