Make code more portable