Added /leave, removed lock function