Reduce number of non-static globals.
Avoid arithmetic on space object pointers.
Remove gratuitous typedef.
Centralize beam globals.
Merge branch 'global' into develop