minor refactor. removed analytics etc