Remove some warning and unused defines
Include additional headers
Decentralise Graphic clk