Complete refactoring.
Output error message if no option is specified.
Cleanup
Fix error when adding a new package.