#10: fixed haskell declaration of root function,
changed export file to be a separet module only for this function
(it is over 5k lines already)