Remove unused code and hide bar on initial load