clean up some stuff while adding function to the books