Added sidebar and removed copy-pasta'd code (replaced with nice function)