Refactored to match standards