Reordered utility modules

All utility modules are now placed in the util module. Further
cleanup is still necessary, as some of the code is old/unused,
and some depends on the new context module.