added analytics module
removed analyse module and moved it into api
moved analytics functions out of data