Updated Analytics Code. Closes #26