Make types more uniform

At the moment getParameters and addParameters deal with different types, which is a bit clumsy.