refactor so subview creation can be overridden
update debug version
updated code comments