Normalized code standard

The code standard is now consistent. Also fixed a few bugs where the wrong
variables in doAction were used.