- added some exception handling and did more code tidying