Just realized close() function in directive isn't needed.