AFL classes -> functions
Test fixes