snapshot of the current development state

clean up and restructure source files