Added parameter replacement and references