renamed window to index
improved window sizing and position