Refactored to follow my own conventions