Updated sidebar code