Refactoring, error handling, summary and help text