Basic cleanup, seems to work now.