restructure, moved stuff from h, to cpp and moved stuff to app