Simplified version
small clean-ups