Straight trees are achieved by wiring any bent trunks and bending to straighten. Remember to take wires of after a couple of months, before they grow enough that the wires mark the bark.
Trees are kept short by pruning. Prune just above a side branch or bud that will become the new top of the trunk. You'll probably have to wire the new top section to straighten it. Always prune lower than the planned height because trees almost always grow upward so new growth will bring your tree back to the desired height.