Optimized a few things