Little refactor to meet cross platform needs