Added a few more global functions. Moderate as necessary...