Working version 1!

introducing Function interface and classes
FunctionSin,FunctionCos,FunctionAvg. Everything is working, but there
is still lot of cleaning to do and better code reuse.