Cleanup + bug-fixes