Reorganisation of files - no edits to support new structure performed yet
Updates to support the newer architecture - updates untested
Trimmed out unused functions