Move a lot of stuff around for better organisation and rewrite engine analysis / evaluation to be a bit more side agnostic.