Fixed Cannot redeclare formatPrice()

Hi, 

I moved the format price into a private function as it is trowing an error with developer mode on.

Thanks,
R