Doc
Allow arbitrary expression as parameter
Minor refactoring