Optimized selectors by using a variable and added explicit declarations for variables