remove printf from the main API and cleanup some includes