Added support for reference parameters (it was easier than i had feared, thankfully).