Refactor tweet handling for future expansion