Optimized a few methods.