code restructure, added some skeleton code for folder and file operations, added workaround to data initialization for flask so it no longer starts two processes