Improved configuration handling + Cleanup