Cleaned up arm prototype code