Extract API logic into classes
Add address2 support