Revert "refactored API-LIb"

This reverts commit d3391084ac3a28be73d1566bda8770ad3ad3a8ec.