code updates for front end and getting mongo queries working