made a lot more changes to the sql functions. fixed newsletters.py (for the most part)