refactor headerupdate.rb
fix indentation and remove unused codes of Ruby scripts