WIP-Built better window code