Large commit. Been hours since the last one. Consider this plugin working now. Too lazy to type out what exactly i did.