Sync with coilib50 sources