Rewrote handling of implicit transaction. The implicit transaction is no longer using the public Transaction class but an internal class and is not accessible by users. It will also be cleaned up in the end of each task.