Code cleanup. Window tweaks.