public void init()
    {           
        //Sprites
        SpriteLoader loader = new SpriteLoader();
        BufferedImage spriteGrid = loader.load("/sprite.png");
        BufferedImage damageGrid = loader.load("/damage.png");
        BufferedImage cursorGrid = loader.load("/cursor.png");
        BufferedImage tileGrid = loader.load("/tile.png");
        im = new Sprite(spriteGrid, damageGrid, cursorGrid, tileGrid);
        tempim = im;
        
        //Temporarily used to write map files (Doesn't work i broke it)
        //MapEditor me = new MapEditor();
        //me.write();
        
        //Map Data
        MapLoader mloader = new MapLoader();
        //map = mloader.load("/map.txt", im);
        map = mloader.load("/test.mf", im);
        //map.printMap();
        
        //Unit Data
        unitList = new ArrayList<>();
//unitGrid = new Unit[map.width][map.height];
        
        //Etc. initializtion
        gui = new Interface(loader.load("/gui.png"), im);
        paths = new Path();
        lookup = new ItemLoader("jdbc:derby://localhost:1527/Item", "gridgame", "maplestory");
        
        //Item load test
        //Item test = new Item(lookup, 100001);
        //System.out.println(test.toString());
        
        //Custom cursor: creates invisible cursor which is redrawn in Interface
        Toolkit toolkit = Toolkit.getDefaultToolkit();  
        setCursor(toolkit.createCustomCursor(im.unit[1][9], new Point(0, 0), "Invisible"));
        
        //Create Units
        addUnit(1, 0, 0, -1, 0);
        addUnit(1, 1, 0, -1, 0);
        addUnit(1, 2, 0, -1, 0);
        addUnit(0, 0, 0, -1, 0);
        addUnit(0, 3, 0, -1, 0);
        addUnit(5, 3, 0, -1, 0);
        addUnit(5, 4, 0, -1, 0);
        addUnit(13, 3, 0, -1, 0);
        
        for(int i = 0; i < 17; i++)
        {
            addUnit(i, 11, 0, 50, 1);
        }
                
        //Mouse Handler
        MouseHandler mh = new MouseHandler();
        this.addMouseListener(mh);
        this.addMouseMotionListener(mh);
        
        //Key Handler
        KeyHandler kh = new KeyHandler();
        this.addKeyListener(kh);
        
        //Create Buttons
        /*gui.addButton("Attack", 0, 0);
        gui.addButton("Nothing", 1, 1);
        gui.addButton("Trade", 2, 2);
        gui.addButton("Inventory", 3, 3);
        gui.addButton("Skill", 4, 4);
        gui.addButton("Cancel", 5, 5);
        gui.addButton("Done", 6, 6);
        gui.addButton("Reset Moves", 7, 7);*/
        
        
        gui.addButton(544, 14, 140, 16, "Up", 9);
        gui.addButton(544, 378, 140, 16, "Down", 10);
        
        gui.addBar(10, 412, 250, 16, 0, new Color(200, 0, 0, 255));
        gui.addBar(10, 430, 250, 16, 1, new Color(0, 75, 255, 255));
        gui.addBar(10, 448, 250, 16, 2, new Color(255, 225, 0, 255));
        //gui.addButton(50, 425, 500, 125, "random button", 11);
    }