Updated with encoding changes and username api