Added onexit, not yet implemented