Use `initialize` instead of `afterAttach`

Moved the invokation of the `View`-constructor, which allowed the use of
`initialize` instead of `afterAttach`