Fixed constructor to allow subclassing

Added boolean to indicate closing animation is already occuring, preventing duplicate calls to close.