Initial actual version of main. PID code still missing.