Main script

Yes, it's tiny and absoluty not elegant.