Code optimization

Some optimizations in code.