Changed functions to be inside prototype object declaration