Moved oic_string and combined mallocs to central place