Performance improvements and better output