Some refactories, new functions...