Updated to improve performance and reduce battery usage