Modified to cache controls