Starting to phase out statics
windowpos no longer static
all statics removed

although had to load config file in an odd place
tidied up some sloppy code