Code cleanup: organized imports
Added a list string for the update action, which was missing
Added code to handle non-existent packages