Modularized code and handled exception handling.