Refactored code. Fixed try..finally on jedis resource.