Free method fix, various refactorings