made code more organized
removed style and added analytics