Windows Port + Cleaner Code