added remove event, minor cleanup
minor code cleanup