Updated modal markup for Bootstrap 3.0 and cleaned up the javascript code