Some refactoring
Split files