Constructor accepts optional "windowid" parameter, and uses this as