Minor bug fixes and Javascript add

I made some minor bug fixes to the two files along with adding the
javascript function to confirm removal of order.