fixed up a couple bugs/cleaned up