added coversion to double
code cleanup, added light if active, fixed rendering in inventory (now shows the unique texture on one side)