Added more description
Refactoring, error handling