Created loop to handle deadlocks in method runTransaction in class Transaction. When it detecs a deadlock, the process of acquiring locks are aborted and restarted.
Added a clock-class which is added as a personal timer for each resource when it is locked