added counter offer logic and front end; tidying up