Use defers for closes
Join string vars
Make all Id functions public