Reimplemented an entire compatibility layer

Adds the whole entire previous api back as a compatibility layer. Still uses the new methods, just forwards them. 
Should fix safe mode issues with tweaks not updated for the new API.

Edit:
Also moved code around to be easier to read/edit