added data structures, debug, and custom UIKit implementation