replace instance variable with local variable

notes/_form still needs to be done
Merge pull request #155 from acmetech/master

replace instance variable with local variable