Update to folder structure and minor code changes