Improved import error handling
Implemented encapsulation