provides the correct functions for primary, secondary, and unified boot blocks. actually behave correctly (e.g. expect correct arguments, perform correct operations) depending on which you are. also some minor cleanup.