More refactoring, put into some folders.