minor improvements, unix spesific ifdef