restructure file system and added database implementation