Cleaned up indentation, added documentation, added preliminary user attribute retrieval.