Handle reusable functions correctly, add documentation
Add demo of reusable function