Refactored code - renamed some methods