Fixed API Bugs - Minor Refactor