Changes referenced from @Feanil's suggestions