refactored fading and cleaned up html