Final

Final to hand in. Fully working (no performance optimisations or
validation)