Refactored code that was used for sheet

Refactored implementation of sheets that are used for install/uninstall/upgrade (with options).