Astyanax integration, refactoring, fixes