Reorganizing code to allow adding more architectures support