Major Cleanup; Added Documentation