Index: branches/script_engine/src/lib/script_engine/account.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/account.cc	(revision 7815)
+++ 	(revision )
@@ -1,105 +1,0 @@
-#include "luna.h"
-/*extern "C" {
-#include <lualib.h>
-}
-*/
-
-class Account
-{
-public:
-  static const char className[];
-  static const Luna<Account>::RegType Register[];
-
-  Account(lua_State* L)
-  {
-    /* constructor table at top of stack */
-    lua_pushstring(L, "balance");
-    lua_gettable(L, -2);
-    m_balance = lua_tonumber(L, -1);
-    lua_pop(L, 2); /* pop constructor table and balance */
-  }
-
-  int deposit(lua_State* L)
-  {
-    std::cout<<"deposit called"<<std::endl;
-    m_balance += lua_tonumber(L, -1);
-    lua_pop(L, 1);
-    return 0;
-  }
-  int withdraw(lua_State* L)
-  {
-    m_balance -= lua_tonumber(L, -1);
-    lua_pop(L, 1);
-    return 0;
-  }
-  int balance(lua_State* L)
-  {
-    lua_pushnumber(L, m_balance);
-    return 1;
-  }
-
-protected:
-  double m_balance;
-};
-
-const char Account::className[] = "Account";
-const Luna<Account>::RegType Account::Register[] =
-  {
-    {"deposit",  &Account::deposit},
-    {"withdraw", &Account::withdraw},
-    {"balance",  &Account::balance},
-    {0}
-  };
-
-class Euclid
-{
-public:
-  static const char className[];
-  static const Luna<Euclid>::RegType Register[];
-
-  Euclid(lua_State* L)
-  {}
-
-  int gcd(lua_State* L)
-  {
-    int m = static_cast<int>(lua_tonumber(L, -1));
-    int n = static_cast<int>(lua_tonumber(L, -2));
-    lua_pop(L, 2);
-
-    /* precondition: m>0 and n>0.  Let g=gcd(m,n). */
-    while( m > 0 )
-    {
-      /* invariant: gcd(m,n)=g */
-      if( n > m )
-      {
-        int t = m; m = n; n = t; /* swap */
-      }
-      /* m >= n > 0 */
-      m -= n;
-    }
-
-    lua_pushnumber(L, n);
-    return 1;
-  }
-};
-
-const char Euclid::className[] = "Euclid";
-const Luna<Euclid>::RegType Euclid::Register[] =
-  {
-    {"gcd", &Euclid::gcd},
-    {0}
-  };
-
-int main(int argc, char* argv[])
-{
-  lua_State* L = lua_open();
-  lua_baselibopen(L);
-  Luna<Account>::Register(L);
- // Luna<Euclid>::Register(L);
-
-  lua_dofile(L, argv[1]);
-
-
-  lua_close(L);
-  return 0;
-}
Index: branches/script_engine/src/lib/script_engine/account.lua
===================================================================
--- branches/script_engine/src/lib/script_engine/account.lua	(revision 7815)
+++ 	(revision )
@@ -1,12 +1,0 @@
---
--- Luna Account example
---
-
-print("testoutput from lua")
-local a = Account{balance=100}
-a:withdraw(25.00)
-a:deposit(50.00)
-print("Account balance = $"..a:balance())
-
-local e = Euclid()
-print("Euclid gcd = "..e:gcd(10000,2))
Index: branches/script_engine/src/lib/script_engine/luna.h
===================================================================
--- branches/script_engine/src/lib/script_engine/luna.h	(revision 7815)
+++ branches/script_engine/src/lib/script_engine/luna.h	(revision 7820)
@@ -19,8 +19,8 @@
  public:
    /* member function map */
-   struct RegType { 
-      const char* name; 
+   struct RegType {
+      const char* name;
       int(T::*mfunc)(lua_State*);
-   };      
+   };
    /* register class T */
    static void Register(lua_State* L) {
@@ -30,7 +30,7 @@
 
      /* if (otag == 0) {
-	otag = lua_newtag(L);
-	lua_pushcfunction(L, &Luna<T>::gc_obj);
-	lua_settagmethod(L, otag, "gc"); /* tm to release objects 
+        otag = lua_newtag(L);
+        lua_pushcfunction(L, &Luna<T>::gc_obj);
+        lua_settagmethod(L, otag, "gc"); /* tm to release objects
       }*/
    }
@@ -38,10 +38,10 @@
  private:
    static int otag; /* object tag */
-   
+
    /* member function dispatcher */
    static int thunk(lua_State* L) {
       /* stack = closure(-1), [args...], 'self' table(1) */
       //int i = static_cast<int>(lua_tonumber(L,-1));
- 
+
        int i = lua_upvalueindex (1);
 
@@ -52,5 +52,5 @@
       lua_pop(L, 1); /* pop closure value and obj */
 
-	printf("FUNCTION:: %d\n", i );
+        printf("FUNCTION:: %d\n", i );
         printf("OBJECT %p\n", obj);
 
@@ -58,5 +58,5 @@
       return (obj->*(T::Register[i].mfunc))(L);
    }
-   
+
 
     static int setScriptable(T* obj)
@@ -64,8 +64,8 @@
      //return registerObject(obj);
      }
-   
+
    static int setScriptable(const std::string& objectName)
     {
-   #warning 'implement do not use'
+   //#warning 'implement do not use'
   //   return registerObject(obj);
     }
@@ -86,5 +86,5 @@
       return 0;
    }
- protected: 
+ protected:
    Luna(); /* hide default constructor */
 
@@ -104,5 +104,5 @@
       //std::cout<<"test"<<std::endl;
 
-    /* Set up garbage collection 
+    /* Set up garbage collection
       if(lua_getmetatable(L, objRef) != 0)
        {
@@ -115,10 +115,10 @@
       //lua_rawgeti (L, LUA_REGISTRYINDEX, objRef);
       /* register the member functions */
-      for (int i=0; T::Register[i].name; i++) 
+      for (int i=0; T::Register[i].name; i++)
       {
-	 lua_pushstring(L, T::Register[i].name);
-	 lua_pushnumber(L, i);
-	 lua_pushcclosure(L, &Luna<T>::thunk, 1);
-	 lua_settable(L,-3);
+         lua_pushstring(L, T::Register[i].name);
+         lua_pushnumber(L, i);
+         lua_pushcclosure(L, &Luna<T>::thunk, 1);
+         lua_settable(L,-3);
       }
       return 1; /* return the table object */
Index: branches/script_engine/src/lib/script_engine/luna/account.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/luna/account.cc	(revision 7820)
+++ branches/script_engine/src/lib/script_engine/luna/account.cc	(revision 7820)
@@ -0,0 +1,105 @@
+#include "luna.h"
+/*extern "C" {
+#include <lualib.h>
+}
+*/
+
+class Account
+{
+public:
+  static const char className[];
+  static const Luna<Account>::RegType Register[];
+
+  Account(lua_State* L)
+  {
+    /* constructor table at top of stack */
+    lua_pushstring(L, "balance");
+    lua_gettable(L, -2);
+    m_balance = lua_tonumber(L, -1);
+    lua_pop(L, 2); /* pop constructor table and balance */
+  }
+
+  int deposit(lua_State* L)
+  {
+    std::cout<<"deposit called"<<std::endl;
+    m_balance += lua_tonumber(L, -1);
+    lua_pop(L, 1);
+    return 0;
+  }
+  int withdraw(lua_State* L)
+  {
+    m_balance -= lua_tonumber(L, -1);
+    lua_pop(L, 1);
+    return 0;
+  }
+  int balance(lua_State* L)
+  {
+    lua_pushnumber(L, m_balance);
+    return 1;
+  }
+
+protected:
+  double m_balance;
+};
+
+const char Account::className[] = "Account";
+const Luna<Account>::RegType Account::Register[] =
+  {
+    {"deposit",  &Account::deposit},
+    {"withdraw", &Account::withdraw},
+    {"balance",  &Account::balance},
+    {0}
+  };
+
+class Euclid
+{
+public:
+  static const char className[];
+  static const Luna<Euclid>::RegType Register[];
+
+  Euclid(lua_State* L)
+  {}
+
+  int gcd(lua_State* L)
+  {
+    int m = static_cast<int>(lua_tonumber(L, -1));
+    int n = static_cast<int>(lua_tonumber(L, -2));
+    lua_pop(L, 2);
+
+    /* precondition: m>0 and n>0.  Let g=gcd(m,n). */
+    while( m > 0 )
+    {
+      /* invariant: gcd(m,n)=g */
+      if( n > m )
+      {
+        int t = m; m = n; n = t; /* swap */
+      }
+      /* m >= n > 0 */
+      m -= n;
+    }
+
+    lua_pushnumber(L, n);
+    return 1;
+  }
+};
+
+const char Euclid::className[] = "Euclid";
+const Luna<Euclid>::RegType Euclid::Register[] =
+  {
+    {"gcd", &Euclid::gcd},
+    {0}
+  };
+
+int main(int argc, char* argv[])
+{
+  lua_State* L = lua_open();
+  lua_baselibopen(L);
+  Luna<Account>::Register(L);
+ // Luna<Euclid>::Register(L);
+
+  lua_dofile(L, argv[1]);
+
+
+  lua_close(L);
+  return 0;
+}
Index: branches/script_engine/src/lib/script_engine/luna/account.lua
===================================================================
--- branches/script_engine/src/lib/script_engine/luna/account.lua	(revision 7820)
+++ branches/script_engine/src/lib/script_engine/luna/account.lua	(revision 7820)
@@ -0,0 +1,12 @@
+--
+-- Luna Account example
+--
+
+print("testoutput from lua")
+local a = Account{balance=100}
+a:withdraw(25.00)
+a:deposit(50.00)
+print("Account balance = $"..a:balance())
+
+local e = Euclid()
+print("Euclid gcd = "..e:gcd(10000,2))
