Basic Window setup almost done

Problem with shared pointers causing heap corruption