Reorganisation and update to use cmake and initialiser lists.