Removes Extra Whitespace When Inserting Commands via API

Resolved issue that added 15 blank text lines above API inserted commands.