Wrapping up BehaviorWindow

review: @adrifelt 

I reflected all @adrifelt's comments and revised code.