Optimize code for a fixed sidebar phase 1

Cleaned up code, commented out a lot of code that was
no longer needed. Will do more optimizations and then
more extensive testing before completely removing the
commented-out code. Also updating CSS.