Initial clean ups

So I have removed unneeded macros, commented out code, reimplemented Avisynth interfaces. Formatting is made more consistent as it was a mix of tabs/spaces and inconsistent brace style.

None of this should have any functional changes. It's just cosmetic refactoring.