Adds AoA method. Adds debug function.