Remove unused code from sidebar, optimize sidebar html output

Signed-off-by: JWhy <jwhy@jwhy.de>