major refactor, more files added