Removes empty lines from commands array