Fixed transactional tests
Code cleanup