Added Twitter support

More bug fixes, logger and algorithm improvements.