Scoped class functions properly, so that they can call private functions correctly.
private class functions are now declared correctly.