revision

Now vhbl builds not using scratchpad for globals will work, code
re-structured + comments