Modularized 1D code and started working on time adaptation