Added hide sidebar on outside click

Removed dead JS code