OS refactor. more to come potentially