major overhaul to support multiple OSes without having to branch