Joined up all the function pointer code etc. TEST