remove duplicate dashboard code
separate out parseJSON logic so it can be reused
dashboard and graph fixes. saving now works