add proper decimate support based on graph height; fix millisecond timestamp; remove some code