fix bugs in demos introduced in previous refactors
Update view API for better attachment.
update view container to play better with the dom