Adding framebuilder unit test. Reduce some function visibility.