Refactoring for OS agnosticism; adjusting layout for future compatibility.