connection extracted to queryTemplate
Model package divided with regard to function
Package Divided.