Move sidebar code