Add Documentation and rename functions