Used a mnemonic define instead of only a number to define the resolution
Some small code optimizations