A lil more refactoring