Config and cleaner code, fixed window