Optimise Code, Fix spacing issue and fix Hash name issue