Improving design
Some minor performance improvements