Optimized some stuff