cleanup code
optimize selectors