Cleaned up scripts to be encapsulated and moved all initialization functions within objects.