First pass at leave functionality