cleaning up stuff, adding some defines