cleanup and some additions