o Add copyleft header
o make #defines static const variables.
o prepare double buffering.