Switch sleep function detection to APR before FFI; Add generic error helper functions; Implement game-loading