fixes for Sprite3D

Adds copyright header
removes compilation warnings
cleans code a bit