Added MBC3 and window rendering, fixed many bugs