Reworking the system hook API. Call pass by reference does not seem to be working on callbacks