better axis tick mark/label handling.
show fewer tick marks on shorter axes so they don't get too crowded.
allow major ticks/labels to show at round number endpoints.
e.g. if the range is [0,1], show the 0 and 1 labels.
fixed a few memory leaks as well and committing a missing file.