Added Unit testing, bug hunting