Gluua: Minor optimizations

General performance optimizations