build minified version
only invoke connection logic if actually connecting
add additional imports