move init code to graphosc. clean up