Renamed several things + small refactorings