Minor issues (imports, closing resources).