First working version of auto.. (a lot of fromJust in there still ;-)