Added new function to window_dropdown. Cleaned up input code