unit tests added
code moved to a Function class
shiftLength test added and new entry in gitignore