Added ability to intercept objects with functions as well