Non-API functions was taken out into a standalone file