Create memsnprintf, some cleanup.