bigfixes and cleanup