Introducing Template pattern similar to Spring's JdbcTemplate.
Added comments