added error specs for api
reorganized spec files