Revert "Refactor a2"

This reverts commit 5913653c461c949004252519e0cf2041af62838f.
Revert "Revert "Refactor a2""

This reverts commit 3a9bce254599c5be345f0e0506980dd8ee07f25a.
Refactor a2