Framework slightly more finalised and tested in solution 00001.