Removed class functions to the global og namespace.
Added library building function.