Initial code. Doesn't work with static or class methods yet.