Some minor fixes

Fixed an issue with the percent calculation when passing a number to
the function, renamed public function