Refacor

Refactored some methouds