1. Refactored.
2. Modularized ApiUtils.