Moved all functions to be encapsulated within their respective objects.