Significant UI code restructuring

Moved UI code into separate files.
Generalised aggregate json code to allow for call stack and file access
information.
Small server side changes to store whole method name as metadata.
Small database changes to help generalise UI code.