Removed main from API, updated main for testing