Refactored some methods