Refactored StudioAPI as plain .js library, and not nodejs module