Added numeric special functions.

Other improvements: developing the map control, updated the shadow and
rewriting code according to guidelines.