Refactored a little more