Moved several private functions

They are now closer to their declarations on Firebolt which means they are also closer to their documentation.