Added missing each keyword
Added protected
Cleaned up code
Added missing each keyword
Merge branch 'master' into issue313_fmi