Moved functions from private to public