refactor web api to use raven