Add comments, ensure all methods properly close DB connection