changes in view builder, model, and controller

Added factory pattern into view. Added __call method into model.