Added modal directive. Closes modal on click of background