Cleanup Hooks, restore original function, remove obsolete OnCommandRaw
Project reference fix-up