Implementing parameter fixing and switching from optim() to nlm().