Figured out how scope works more, wrapped D3 inside of a scope function