new file structure and multiple fixes