cleanup + fix bugs
merge