Cleaned up aviary code