Separate function def from rest of program
Merge pull request #1 from vlarsen/master

Separate function def from rest of program