Overhauled modern fortran rules. Fixes #10 #11 #12