Done all the agly code