Basic algorithms and such.