Pulled out of whitespace modifications
Moved some of the custom logic for BSTCTL into its own function.