Clean up sidebar code #56