Cleanup, and remove some broken code