Minor bug fixes and adding Twitter error handler