Initial commit after a major messup that almost cost me my sanity
Implemented aditional fixes, it should be back to par to where it used to be

Some cleaning up is still necessary, but for that that'll do.