update folder structure plus fix some type errors