Cleaned up windows init code