starting to remove django bits, added tests for srfm.py (and fixed/changed some things)