rewrite views creation from maps into specilized objects

#206
What you think about moving this if statement to separate method?