Refactored API boot function into its own API handling trait