Kevin/twitter optimization

Fixed numerous bugs as well.