fix sidebar to work on left/right side

PS3:  Fixed compile error, and cleaned things up

Change-Id: Iaff5b6d9b3f56a20c007b1b4caec19e580d8e389
Merge "fix sidebar to work on left/right side" into jb42