started js refactoring and added some css for sidebar