Added activeAndState Function
Added releaseLockError to rollback transactions
Added comments