Remove deprecated methods + some refactorings