Extract method for analyzing expressions
Add basic validation of window frame bounds