Updated to support memoir class