Move compat to /data/lib/ and added more custom functions for to retro compatibility