fix getter problem in components and refactor old files