I've recently looked up the exact format of a transaction and came up with this (source with explanation):
However, this seems not to include transaction fees. Are they not part of the transaction? Or do they have a special output lock script that basically makes it available to everybody?