Design Document

updated design document with javascript classes and functions