Formated code, fixed SetOwner

Formated code to be compatible with Lua Code Conventions and Fixed
SetOwner