Replaced complicated variable types with auto. Closes #215.