Fix macros
Fix function signatures
General fixes. Realizing I need to structure this differently.