First fully functioning version. Lots left to understand and code...