Refactored transparent functions slightly.