--- a/BlockOut/SoundManager.cpp
+++ b/BlockOut/SoundManager.cpp
@@ -21,6 +21,7 @@
 
 #define PLAY(x) if( enabled && x ) Mix_PlayChannel (-1, x, 0);
 
+extern const char * LID(const char * fileName);
 // ------------------------------------------------
 
 SoundManager::SoundManager() {
@@ -82,7 +83,7 @@
 
 // ------------------------------------------------
 
-int SoundManager::InitSound(char *fileName,Mix_Chunk **snd) {
+int SoundManager::InitSound(const char *fileName,Mix_Chunk **snd) {
 
   *snd = Mix_LoadWAV ( fileName );
   if( *snd == NULL ) {
--- a/BlockOut/Types.h
+++ b/BlockOut/Types.h
@@ -197,21 +197,21 @@
 // Util functions
 //-----------------------------------------------------------------------------
 
-extern VERTEX v(float x,float y,float z);
-extern void Normalize(VERTEX *v);
-extern int fround(float x);
-extern char *FormatTime(float seconds);
-extern char *FormatDate(uint32 time);
-extern char *FormatDateShort(uint32 time);
-extern int CreateTexture(int width,int height,char *imgName,GLuint *hmap);
-extern char GetChar(BYTE *keys);
+VERTEX v(float x,float y,float z);
+void Normalize(VERTEX *v);
+int fround(float x);
+char *FormatTime(float seconds);
+char *FormatDate(uint32 time);
+char *FormatDateShort(uint32 time);
+int CreateTexture(int width,int height,const char *imgName,GLuint *hmap);
+char GetChar(BYTE *keys);
 #ifndef WINDOWS
-extern void ZeroMemory(void *buff,int size);
+void ZeroMemory(void *buff,int size);
 #endif
-extern BOOL DirExists(char *dirname);
-extern BOOL CheckEnv();
-extern char *LID(char *fileName);
-extern char *LHD(char *fileName);
+BOOL DirExists(char *dirname);
+BOOL CheckEnv();
+const char *LID(const char *fileName);
+const char *LHD(const char *fileName);
 
 
 #endif /* TYPESH */
--- a/BlockOut/Utils.cpp
+++ b/BlockOut/Utils.cpp
@@ -236,7 +236,7 @@
 // Name: LID()
 // Desc: Locate file in the installation directory
 //-----------------------------------------------------------------------------
-char *LID(char *fileName) {
+const char *LID(const char *fileName) {
 
 #ifdef WINDOWS
   return fileName;
@@ -252,7 +252,7 @@
 // Name: LHD()
 // Desc: Locate file in the home directory
 //-----------------------------------------------------------------------------
-char *LHD(char *fileName) {
+const char *LHD(const char *fileName) {
 
   static char ret[512];
 
@@ -276,7 +276,7 @@
 // Name: CreateTexture()
 // Desc: Create a texture (no alpha)
 //-----------------------------------------------------------------------------
-int CreateTexture(int width,int height,char *imgName,GLuint *hmap) {
+int CreateTexture(int width,int height,const char *imgName,GLuint *hmap) {
 
   *hmap = 0;
   CImage img;
--- a/BlockOut/MenuGraphics.cpp
+++ b/BlockOut/MenuGraphics.cpp
@@ -438,7 +438,7 @@
 
 // ---------------------------------------------------------------------
 
-void Menu::RenderTitle(char *title) {
+void Menu::RenderTitle(const char *title) {
 
   int  lgth = (int)strlen(title);
   int  nwFont = fround((float)wFont*1.1f);
@@ -454,7 +454,7 @@
 
 // ---------------------------------------------------------------------
 
-void Menu::RenderText(int x,int y,BOOL selected,char *text) {
+void Menu::RenderText(int x,int y,BOOL selected,const char *text) {
 
   float startLine   = 0.515f;
   float startColumn = 0.15f;
--- a/BlockOut/Menu.h
+++ b/BlockOut/Menu.h
@@ -61,8 +61,8 @@
     // Menu page
     void ToPage(MenuPage *page);
     void ToPage(MenuPage *page,int iParam,void *wParam);
-    void RenderText(int x,int y,BOOL selected,char *text);
-    void RenderTitle(char *title);
+    void RenderText(int x,int y,BOOL selected,const char *text);
+    void RenderTitle(const char *title);
 
     PageMainMenu mainMenuPage;
     PageStartGame startGamePage;
--- a/BlockOut/SetupManager.h
+++ b/BlockOut/SetupManager.h
@@ -67,7 +67,7 @@
     float GetAnimationTime(); /* in seconds */
 
     // Names
-    char *GetName();
+    const char *GetName();
     const char *GetBlockSetName();
 
     // Sound
--- a/BlockOut/EditControl.cpp
+++ b/BlockOut/EditControl.cpp
@@ -30,7 +30,7 @@
 
 // ------------------------------------------------
 
-void EditControl::SetMode(char *text,BOOL edit,BYTE *keys) {
+void EditControl::SetMode(const char *text,BOOL edit,BYTE *keys) {
 
   if( strlen(text)>=255 ) {
     strncpy(editText,text,255);
--- a/BlockOut/EditControl.h
+++ b/BlockOut/EditControl.h
@@ -27,7 +27,7 @@
     void SetDisplayLength(int length);
 
     // Set edit control mode (keys can be NULL)
-    void SetMode(char *text,BOOL edit,BYTE *keys);
+    void SetMode(const char *text,BOOL edit,BYTE *keys);
 
     // Get the mode
     BOOL GetMode();
--- a/BlockOut/SoundManager.h
+++ b/BlockOut/SoundManager.h
@@ -55,7 +55,7 @@
     void SetEnable(BOOL enable);
 
   private:
-    int InitSound(char *fileName,Mix_Chunk **snd);
+    int InitSound(const char *fileName,Mix_Chunk **snd);
 
     char errMsg[1024];
     BOOL enabled;
--- a/BlockOut/SetupManager.cpp
+++ b/BlockOut/SetupManager.cpp
@@ -364,7 +364,7 @@
 
 // ------------------------------------------------
 
-char *SetupManager::GetName() {
+const char *SetupManager::GetName() {
 
   static char ret[32];
   strcpy(ret,"");
--- a/BlockOut/BlockOut.cpp
+++ b/BlockOut/BlockOut.cpp
@@ -65,11 +65,11 @@
 // Name: BlockOut()
 // Desc: Application constructor. Sets attributes for the app.
 //-----------------------------------------------------------------------------
-BlockOut::BlockOut()
+BlockOut::BlockOut() : GLApplication(STR(APP_VERSION))
 {
   inited = FALSE;
   mode = MENU_MODE;
-  m_strWindowTitle = STR(APP_VERSION);
+//   m_strWindowTitle = STR(APP_VERSION);
   ZeroMemory( m_bKey, sizeof(m_bKey) );
 }
 
--- a/BlockOut/GLApp/GLApp.h
+++ b/BlockOut/GLApp/GLApp.h
@@ -60,7 +60,7 @@
 
     // Internal variables for the state of the app
     BOOL      m_bWindowed;
-    char*     m_strWindowTitle;
+    const char* m_strWindowTitle;
     int       m_screenWidth;
     int       m_screenHeight;
     BOOL      m_bVSync;
@@ -95,7 +95,7 @@
     static void printGlError();
 
     // Internal constructor
-    GLApplication();
+    GLApplication(const char * strWindowTitle);
 
 private:
 
--- a/BlockOut/GLApp/GLApp.cpp
+++ b/BlockOut/GLApp/GLApp.cpp
@@ -14,11 +14,13 @@
 
 // -------------------------------------------
 
-GLApplication::GLApplication() {
+GLApplication::GLApplication(const char * strWindowTitle) : 
+    m_strWindowTitle(strWindowTitle)
+{
 
   m_bWindowed = true;
   m_bVSync = false;
-  m_strWindowTitle = (char *)"GL application";
+  //m_strWindowTitle = (char *)"GL application";
   strcpy((char *)m_strFrameStats,"");
   m_screenWidth = 640;
   m_screenHeight = 480;
@@ -286,7 +288,7 @@
 #ifdef WINDOWS
   MessageBox(NULL, message, "Error", MB_OK | MB_ICONERROR);
 #else
-  printf(message);
+  printf("%s", message);
 #endif
 
 }
--- a/BlockOut/GLApp/GLSprite.h
+++ b/BlockOut/GLApp/GLSprite.h
@@ -15,7 +15,7 @@
   
   // Initialise the sprite
   // return 1 when success, 0 otherwise
-  int RestoreDeviceObjects(char *diffName,char *alphaName,int srcWidth,int scrHeight);
+  int RestoreDeviceObjects(const char *diffName,const char *alphaName,int srcWidth,int scrHeight);
 
   // Update sprite mapping and coordinates
   void UpdateSprite(int x1,int y1,int x2,int y2);
--- a/BlockOut/GLApp/GLSprite.cpp
+++ b/BlockOut/GLApp/GLSprite.cpp
@@ -8,7 +8,7 @@
 #undef LoadImage
 #include <CImage.h>
 
-extern char *LID(char *fileName);
+extern const char *LID(const char *fileName);
 
 // -------------------------------------------
 
@@ -54,7 +54,7 @@
 
 // -------------------------------------------
 
-int Sprite2D::RestoreDeviceObjects(char *diffName,char *alphaName,int scrWidth,int scrHeight) {
+int Sprite2D::RestoreDeviceObjects(const char *diffName,const char *alphaName,int scrWidth,int scrHeight) {
 
   GLint  bpp;
   GLenum format;
--- a/BlockOut/GLApp/GLFont.cpp
+++ b/BlockOut/GLApp/GLFont.cpp
@@ -8,7 +8,7 @@
 #undef LoadImage
 #include <CImage.h>
 
-extern char *LID(char *fileName);
+extern const char *LID(const char *fileName);
 
 // -------------------------------------------
 
@@ -21,7 +21,7 @@
 
   // Load the image
   CImage img;
-  if( !img.LoadImage(LID((char *)"images/font.png")) ) {
+  if( !img.LoadImage(LID("images/font.png")) ) {
 #ifdef WINDOWS
     char message[256];
 	sprintf(message,"Failed to load %s\n",LID((char *)"images/font.png"));
--- a/ImageLib/include/CImage.h
+++ b/ImageLib/include/CImage.h
@@ -16,7 +16,7 @@
 	// Load an image
 	// Supports GIF , JPG or PNG format
 	// Return 1 when image has been succesfully load , 0 otherwise.
-  int LoadImage(char *FileName);
+  int LoadImage(const char *FileName);
 
 	// Get error message if LoadImage fails.
 	char *GetErrorMessage();
--- a/ImageLib/src/CImage.cpp
+++ b/ImageLib/src/CImage.cpp
@@ -27,7 +27,7 @@
 
 // ------ Load image -----
 
-int CImage::LoadImage(char *FileName) {
+int CImage::LoadImage(const char *FileName) {
 
   Release();
 
--- a/ImageLib/src/CImage.h
+++ b/ImageLib/src/CImage.h
@@ -18,7 +18,7 @@
 	// Load an image
 	// Supports GIF , JPG or PNG format
 	// Return 1 when image has been succesfully load , 0 otherwise.
-    int LoadImage(char *FileName);
+    int LoadImage(const char *FileName);
 
 	// Get error message if LoadImage fails.
 	char *GetErrorMessage();
--- a/ImageLib/src/png/hpng.c
+++ b/ImageLib/src/png/hpng.c
@@ -1,5 +1,6 @@
 #include <malloc.h>
 #include <math.h>
+#include <string.h>
 #include "png/png.h"
 #include "hpng.h"
 
