started to reorganize

Split & renamed functions, added some docs