Finetuning oEmbed integration. Comments and refactoring added.