Added more tests and caching PreparedStatement methods. refs #445