updated code style added some comments a few 'if' and 'case' statements rewriten to make them more readable
updated code style
added some comments
a few 'if' and 'case' statements rewriten to make them more readable

Committing for H�kan Stenholm <hsten@it.su.se>.


git-svn-id: 3f662d0c7823f96a484d6a9a7c90f2d7866b6747@576 e454d3dc-12ff-0310-9b8b-94264392205f

bernardd/yxa,bernardd/yxa,bernardd/yxa,bernardd/yxa