Bug fixes and changes in TimeFunctions struct
Added functionality to main form