Some cleanup, might be able to do more later