Function wrappers for AOP advices (cleaned)

What about wrappers to convert functions to AOP advices?

This is fixed and cleaned version of my previous pull request. This time with no whitespace issues and unnecessary changes. Sorry for the mess.