Tried to make compatible with VS -- some bugs still with virtual functions