Formatting: adopted Qt coding style, 4 spaces indentation, K&R style control structures