Addressing Issue #51 & Issue #52

1. Adds attributes to non-leaf elements.
2. Elements with the same name will now be in a proper numerically indexed array rather than having the first element having its child elements as non-numeric keys.
There's a missing space after `if` there. Guzzle follows PSR-2.