Added Documentation and some minor fixes