REverted many changes to make it compatible

with all oxmin plugins