Some refactoring
FIx