analytics and code cleaned