Misc. Cleanup and fixes