Fix style issues + some refactoring in wamfs.*

@rginda