add some documentation and restructure files to follow conventions