Implemented non-linear flag in main.f90