Remove empty strings in compact function

#### Resolves #50