Random fixes and cleanup