Rafactoring top level client code before starting a nicer demo. IT VERKS YA