Optimized code, code clean up.