Heavily updated and seemingly working.