Fix some style issues in wamfs.*
Merge pull request #3217 from ussuri/minor-cleanups

Fix style issues + some refactoring in wamfs.*