Refactors some methods