Minor changes to improve performance and reduce execution time