Added exception handling, more tests, services