pw and fixes to front end