more hiddenAttribute logic cleanups
minor refactoring