Add ifdef and first tests