Some refactoring on instagram functionality.