clean up
better structure and documentation