Seemingly complete, needs more code cleanup