Added exception handling in objects and fixed few bugs #11