Cleaned up some, still got a few nasty bugs...