Optimized (removed useless debug stuff)