rebuilt surveys

surveys have many survey questions and can be in many groups
began reformating json output for api

currently not nested properly
merge master