Fix the messy coding