Index: vulkan-ref.cpp
===================================================================
--- vulkan-ref.cpp	(revision 203ab1bb4bc5c4f4c34de07f7cb1d8ce9d17c3c4)
+++ vulkan-ref.cpp	(revision 09e15a42fb5e39d51855bce8fdf5937f9837da1e)
@@ -108,4 +108,5 @@
 };
 
+/*** START OF REFACTORED CODE ***/
 VkResult CreateDebugUtilsMessengerEXT(VkInstance instance,
       const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo,
@@ -144,9 +145,9 @@
    private:
       GameGui* gui = new GameGui_SDL();
+
       SDL_version sdlVersion;
       SDL_Window* window = nullptr;
-
-      // TODO: Come up with more descriptive names for these
       SDL_Renderer* gRenderer = nullptr;
+/*** END OF REFACTORED CODE ***/
       SDL_Texture* uiOverlay = nullptr;
 
@@ -155,6 +156,8 @@
       SDL_Texture* uiImage = nullptr;
 
+/*** START OF REFACTORED CODE ***/
       VkInstance instance;
       VkDebugUtilsMessengerEXT debugMessenger;
+/*** END OF REFACTORED CODE ***/
       VkSurfaceKHR surface;
 
@@ -222,9 +225,6 @@
       bool framebufferResized = false;
 
-      // TODO: Make make some more initi functions, or call this initUI if the
-      // amount of things initialized here keeps growing
+/*** START OF REFACTORED CODE ***/
       bool initWindow() {
-         // TODO: Put all fonts, textures, and images in the assets folder
-
          if (gui->init() == RTWO_ERROR) {
             cout << "UI library could not be initialized!" << endl;
@@ -245,4 +245,5 @@
             return RTWO_ERROR;
          }
+/*** END OF REFACTORED CODE ***/
 
          SDL_VERSION(&sdlVersion);
@@ -307,7 +308,9 @@
       }
 
+/*** START OF REFACTORED CODE ***/
       void initVulkan() {
          createInstance();
          setupDebugMessenger();
+/*** END OF REFACTORED CODE ***/
          createSurface();
          pickPhysicalDevice();
@@ -459,4 +462,5 @@
       }
 
+/*** START OF REFACTORED CODE ***/
       vector<const char*> getRequiredExtensions() {
          vector<const char*> extensions = gui->getRequiredExtensions();
@@ -487,4 +491,5 @@
          createInfo.pfnUserCallback = debugCallback;
       }
+      /*** END OF REFACTORED CODE ***/
 
       void createSurface() {
@@ -708,12 +713,8 @@
          if (capabilities.currentExtent.width != numeric_limits<uint32_t>::max()) {
             return capabilities.currentExtent;
-         }
-         else {
-            int width, height;
-            gui->getWindowSize(&width, &height);
-
+         } else {
             VkExtent2D actualExtent = {
-               static_cast<uint32_t>(width),
-               static_cast<uint32_t>(height)
+               static_cast<uint32_t>(gui->getWindowWidth()),
+               static_cast<uint32_t>(gui->getWindowHeight())
             };
 
@@ -1811,12 +1812,10 @@
 
       void recreateSwapChain() {
-         int width = 0, height = 0;
-
-         gui->getWindowSize(&width, &height);
-
-         while (width == 0 || height == 0 ||
+         gui->refreshWindowSize();
+
+         while (gui->getWindowWidth() == 0 || gui->getWindowHeight() == 0 ||
             (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED) != 0) {
             SDL_WaitEvent(nullptr);
-            gui->getWindowSize(&width, &height);
+            gui->refreshWindowSize();
          }
 
@@ -1875,13 +1874,14 @@
 
          vkDestroyCommandPool(device, commandPool, nullptr);
-
          vkDestroyDevice(device, nullptr);
-
+         vkDestroySurfaceKHR(instance, surface, nullptr);
+
+/*** START OF REFACTORED CODE ***/
          if (enableValidationLayers) {
             DestroyDebugUtilsMessengerEXT(instance, debugMessenger, nullptr);
          }
 
-         vkDestroySurfaceKHR(instance, surface, nullptr);
          vkDestroyInstance(instance, nullptr);
+/*** END OF REFACTORED CODE ***/
 
          // TODO: Check if any of these functions accept null parameters
@@ -1906,4 +1906,5 @@
          }
 
+/*** START OF REFACTORED CODE ***/
          SDL_DestroyRenderer(gRenderer);
          gRenderer = nullptr;
@@ -1912,4 +1913,5 @@
          gui->shutdown();
          delete gui;
+/*** END OF REFACTORED CODE ***/
       }
 
@@ -1986,4 +1988,5 @@
 };
 
+/*** START OF REFACTORED CODE ***/
 int main(int argc, char* argv[]) {
 
@@ -2009,2 +2012,3 @@
    return EXIT_SUCCESS;
 }
+/*** END OF REFACTORED CODE ***/
