Prepare for some future enhancements
Minor code refactoring and fix test
Remove usages of mpif95 and add mpifort and mpif08