Now import entire datetime module to avoid confusion of what datetime
on its own refers to.  Hence occurences of datetime are replaced with
datetime.datetime.

Made some other small changes suggested by SunPy code review.