clean up vladimir's code.
Added copy protection.