Added Twitter error page and refactored some stuff