changes to script and front end
lots of changes