Fixes for Android, cleanup, and Relay improvements